Skip to content

add support for spring boot 4, with a fallback to 3#1226

Merged
ramonskie merged 1 commit intocloudfoundry:mainfrom
zakerf:spring-boot-4-support
Apr 24, 2026
Merged

add support for spring boot 4, with a fallback to 3#1226
ramonskie merged 1 commit intocloudfoundry:mainfrom
zakerf:spring-boot-4-support

Conversation

@zakerf
Copy link
Copy Markdown
Contributor

@zakerf zakerf commented Mar 27, 2026

related to #1222

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Mar 27, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: zakerf / name: zakerf (779c8af)

@zakerf zakerf force-pushed the spring-boot-4-support branch from 32072db to ad838f3 Compare March 27, 2026 16:00
Comment thread manifest.yml Outdated
@ramonskie
Copy link
Copy Markdown
Contributor

ramonskie commented Mar 30, 2026

why is a fallback necessary?
as i do not see any breaking changes between 3.5.1 and 4.0.0
pivotal-cf/java-cfenv@v3.5.1...v4.0.0

@stokpop
Copy link
Copy Markdown
Contributor

stokpop commented Mar 31, 2026

@ramonskie I think calls to SpringBoot deps change when going from SpringBoot 3 -> 4, so you I guess you run into runtime "class not found" exceptions: e.g. pivotal-cf/java-cfenv@1dd9ccb

import org.springframework.boot.env.EnvironmentPostProcessor;
<-> 
import org.springframework.boot.EnvironmentPostProcessor;

Comment thread manifest.yml Outdated
@zakerf
Copy link
Copy Markdown
Contributor Author

zakerf commented Mar 31, 2026

@ramonskie the compatibility matrix also mentions that java-cfenv 4.x is for Spring Boot 4 and java-cfenv 3.x is for Spring Boot 3

Comment thread src/java/frameworks/java_cf_env.go Outdated
@ramonskie
Copy link
Copy Markdown
Contributor

ramonskie commented Apr 16, 2026

cfenv should be added as a dependency-build and not be added within here in the manifest.
this way we will keep with updates
see https://github.com/cloudfoundry/buildpacks-ci/blob/master/pipelines/dependency-builds

we should add something like there in the config.yml

  cfenv:
    buildpacks:
      java:
        lines:
          - line: 3.X.X
          - line: 4.X.X
    source_type: github_releases
    source_params:
      - 'repo: /pivotal-cf/java-cfenv'
      - 'fetch_source: true'
    any_stack: true
    versions_to_keep: 1

im putting this here in the hope that ppl will understand the structure more clearly and that they could make a pr for this :)

@zakerf
Copy link
Copy Markdown
Contributor Author

zakerf commented Apr 19, 2026

cfenv should be added as a dependency-build and not be added within here in the manifest. this way we will keep with updates see https://github.com/cloudfoundry/buildpacks-ci/blob/master/pipelines/dependency-builds

we should add something like there in the config.yml

  cfenv:
    buildpacks:
      java:
        lines:
          - line: 3.X.X
          - line: 4.X.X
    source_type: github_releases
    source_params:
      - 'repo: /pivotal-cf/java-cfenv'
      - 'fetch_source: true'
    any_stack: true
    versions_to_keep: 1

im putting this here in the hope that ppl will understand the structure more clearly and that they could make a pr for this :)

Thanks! I'll prep a PR

@ramonskie
Copy link
Copy Markdown
Contributor

ramonskie commented Apr 23, 2026

the cfenv has now been added and updated see #1253 and #1251
so please adjust this pr
so we can merge it and include it within 5.0.2 release

@zakerf zakerf force-pushed the spring-boot-4-support branch from eb9a18d to 1d030d7 Compare April 23, 2026 17:46
@zakerf
Copy link
Copy Markdown
Contributor Author

zakerf commented Apr 23, 2026

the cfenv has now been added and updated see #1253 and #1251 so please adjust this pr so we can merge it and include it within 5.0.2 release

Rebased the branch to latest main to be up to date again

Copy link
Copy Markdown
Contributor

@stokpop stokpop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check default version for SB3.

Comment thread src/java/frameworks/java_cf_env.go Outdated
Comment thread src/java/frameworks/java_cf_env.go Outdated
@zakerf zakerf force-pushed the spring-boot-4-support branch from 1d030d7 to 779c8af Compare April 24, 2026 07:52
@ramonskie
Copy link
Copy Markdown
Contributor

i do not like the hardcoded defaults. but for now it is okay is i do not expect it to change anytime soon

@ramonskie ramonskie merged commit 1b128e4 into cloudfoundry:main Apr 24, 2026
1 check passed
@zakerf
Copy link
Copy Markdown
Contributor Author

zakerf commented Apr 24, 2026

@ramonskie thanks for the support and merging the pr!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants